userInfo = require("../utils/getWeiXinUserInfo")

exports.home = ->
    code = this.query.code

    console.log("code" + code)
    if code
        info = yield from userInfo.gGetInfo(code)

        data =
            title: "Home page"
        this.render "index", data
    else
        data =
            title: "Home page"
        this.render "index", data